MPEG (Moving Picture Experts Group) of ISO/IEC JTC 1 has recommended MPEG-4 Part 10: Advanced Video Coding (in the following, it is called MPEG-4 AVC for short) as a standard for the latest technology operable to encode moving picture data and to decode encoded picture data thereof. In the MPEG-4 AVC, in order to improve image quality at a low bit rate, an in-loop filter (it is also called a deblocking filter) is adopted to remove block distortion from a decoded picture. Due to the in-loop filter, it is possible to prevent occurrence of unfavorable situation such as block distortion of a picture is included in a reference picture and spreads to a decoded picture, thereby making it possible to acquire a decoded picture with good image quality.
The MPEG-4 AVC adopts a “slice” as a fundamental unit of encoding/decoding. A plurality of slices constitutes one picture. Regarding an arrangement of the slices within a picture, there is provided a function of ASO (arbitrary slice order). When using the ASO function, a plurality of slices within a picture can be transmitted in arbitrary order.
For example, when encoding a picture by dividing the picture into a plurality of slices, the picture is usually encoded and transmitted from a slice at the upper left of the picture, in a raster scan order. However, when using the ASO function, it is possible for the picture to be encoded and transmitted in order of importance of a slice, even if the slice is located in the middle of the picture.
Examples of practicing the ASO function are mentioned in the following. When the throughput of a decoder is insufficient, a picture is divided into a plurality of slices by an encoder, a slice of the important part in the picture is encoded earlier than the other slices within the same picture, and the encoded picture data is transmitted first. A decoder decodes only the encoded picture data of the important slice that is received first, and may perform skip processing without decoding the encoded picture data of the other slices. Thus, even when the throughput of the decoder is insufficient, the important part of the picture is decoded for certain and is provided for viewing.
FIG. 14 is a block diagram of a conventional picture decoding device 1 that is disclosed in Document 1 (Published Japanese patent application 2003-304538). The conventional picture decoding device 1 shown in FIG. 14 comprises a decoding unit 2, a frame memory 8, and an in-loop filter 9. The decoding unit 2 comprises a variable length decoding unit 3, a motion compensating unit 4, an inverse-quantizing unit 5, an inverse orthogonal transforming unit 6, and an adding unit 7.
The outline of operation of the conventional picture decoding device 1 is explained. The variable length decoding unit 3 decodes inputted variable length encoded picture data, and outputs quantized picture data and a motion vector. The inverse-quantizing unit 5 inverse-quantizes the quantized picture data, and outputs the inverse-quantized picture data. The inverse orthogonal transforming unit 6 performs inverse orthogonal transformation for the inverse-quantized picture data, and outputs a difference image. The motion compensating unit 4 generates a motion compensated picture (predicted picture) using the motion vector, which the variable length decoding unit 3 has outputted, and the decoded picture, which is already decoded and stored in the frame memory 8. The adding unit 7 adds the difference image outputted by the inverse orthogonal transforming unit 6 and the predicted picture outputted by the motion compensating unit 4, and generates a reconstructed picture. The in-loop filter 9 obtains a decoded picture by performing deblock-filtering to the reconstructed picture, and outputs the decoded picture to an output terminal while storing in the frame memory 8.
The in-loop filter 9 performs the deblock-filtering for the reconstructed picture. The deblock-filtering according to the MPEG-4 AVC is explained referring to FIG. 15. FIG. 15 shows a macro block boundary and a macro block arrangement. In the deblock-filtering for pixels belonging to a macro block A with the upper edge adjoining the macro block boundary, the pixel value is filtered using the pixel value of pixels belonging to a macro block B with the lower edge adjoining the macro block boundary. In the deblock-filtering for pixels belonging to a macro block C with the left side edge adjoining the macro block boundary, the pixel value is filtered using the pixel value of pixels belonging to a macro block D with the right side edge adjoining the macro block boundary. Therefore, when performing the in-loop filtering to a certain target macro block, decoding for a macro block located on the top of the target macro block and for the macro block located on the left of the target macro block has to be completed at that time. The art regarding the deblock-filtering is disclosed in Document 2 (Published Japanese patent application 2000-59769).
However, if the ASO function is adopted in the conventional picture decoding device 1 shown in FIG. 14, when a first slice, which is going to be transmitted in arbitrary order, starts in the middle of the picture, macro blocks located on the top of and on the left side of the boundary of the first slice are not yet decoded at a time when a macro block adjoining the boundary of the first slice is decoded, since the macro blocks located on the top of and on the left side of the boundary are included in a different slice. Therefore, when adopting the ASO function for the conventional picture decoding device 1, proper deblock-filtering to the macro block boundary cannot be performed. In other words, the conventional picture decoding device 1 cannot perform decoding of the encoded picture data of arbitrary slice order appropriately.